//
//  MovieDataView.m
//  豆瓣2
//
//  Created by dllo on 15/12/19.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "MovieDataView.h"

@implementation MovieDataView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self createSubMovie];
    }
    return  self;
}

- (void)createSubMovie{
    
    self.scrollView = [[UIScrollView alloc]initWithFrame:self.bounds];
    self.scrollView.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.scrollView];
    
    
    self.myView = [[UIImageView alloc]initWithFrame:CGRectMake(30, 50, 120, 160)];
    //  self.myView.backgroundColor = [UIColor yellowColor];
    [self.scrollView addSubview:self.myView];
    
    UILabel *blab = [[UILabel alloc]initWithFrame:CGRectMake(170, 50, 200, 20)];
    blab.text = @"评分:";
    [self.scrollView addSubview:blab];
    
    self.rating = [[UILabel alloc]initWithFrame:CGRectMake(210, 50, 200, 20)];
    self.rating.text = @"a";
    [self.scrollView addSubview:self.rating];
    
    self.time = [[UILabel alloc]initWithFrame:CGRectMake(170, 80, 200, 20)];
    self.time.text = @"b";
    [self.scrollView addSubview:self.time];
    
    
    self.elease = [[UILabel alloc]initWithFrame:CGRectMake(170, 110, 200, 20)];
    self.elease.text = @"c";
    [self.scrollView addSubview:self.elease];
    
    self.genres = [[UILabel alloc]initWithFrame:CGRectMake(170, 150, 200, 20)];
    self.genres.text = @"d";
    [self.scrollView addSubview:self.genres];
    
    self.county = [[UILabel alloc]initWithFrame:CGRectMake(170, 190, 200, 20)];
    self.county.text = @"f";
    [self.scrollView addSubview:self.county];
    
    
    UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(30, 250, 200, 30)];
    lab.text = @"制作人";
    [self.scrollView addSubview:lab];
   
    self.zlab = [[UILabel alloc]initWithFrame:CGRectMake(30, 280, 380, 50)];
    self.zlab.text = @"hh";
    self.zlab.numberOfLines = 0;
    [self.scrollView addSubview:self.zlab];
    
    
    UILabel *alab = [[UILabel alloc]initWithFrame:CGRectMake(30, 330, 200, 50)];
    alab.text = @"电影情节";
    alab.numberOfLines = 0;
    alab.adjustsFontSizeToFitWidth= YES;
    [self.scrollView addSubview:alab];
   
    
    
    self.film = [[UILabel alloc]initWithFrame:CGRectMake(30, 370, 380, 100)];
    [self.scrollView addSubview:self.film];
    self.film.numberOfLines = 0;
   
    
    
}

@end
